<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link href="/css/shop.css" type="text/css" rel="stylesheet" />
<link href="/css/Sellerber.css" type="text/css"  rel="stylesheet" />
<link href="/css/bkg_ui.css" type="text/css"  rel="stylesheet" />
<link href="/font/css/font-awesome.min.css"  rel="stylesheet" type="text/css" />
<link  href="/css/colorbox.css" rel="stylesheet" type="text/css" />
<script src="/js/jquery-1.9.1.min.js" type="text/javascript" ></script>
<script src="/js/Sellerber.js" type="text/javascript"></script>
<script src="/js/layer/layer.js" type="text/javascript"></script>
<script src="/js/laydate/laydate.js" type="text/javascript"></script>
<!--[if lt IE 9]>
<script src="/js/html5shiv.js" type="text/javascript"></script>
<script src="/js/respond.min.js"></script>
<script src="/js/css3-mediaqueries.js"  type="text/javascript"></script>
  <![endif]-->
<title>详细</title>
</head>

<body>
<div class="margin clearfix">
 <div class="operation clearfix">
<span class="submenu"><a href="javascript:void(0)" name="add_product.html" class="btn button_btn bg-deep-blue" title="添加分类"><i class="fa  fa-edit"></i>&nbsp;添加轮播图</a></span>
</div>
<div class="adverts_list">
<#list homeImgsList as homeimgs>
 <div class="col-xs-4 col-sm-4 col-md-4 col-lg-4" id="img_${(homeimgs.id)!}">
  <div class="adverts_content">
   <div class="ad_img"><img src="${(homeimgs.imgurl)!}"  height="200px" width="300px"/></div>
   <div class="ad_info clearfix">
   <p>广告标题：${homeimgs.title}</p>
   <p>图片地址：${homeimgs.imgurl}</p>
   <p>点击指向：${(homeimgs.link)!}</p>
   <p>是否启用：${homeimgs.getImgsStatusEnum().msg}</p>
   <ul class="operating">
    <li class="col-xs-3 "><a href="javascript:void()" onclick="del(this,${homeimgs.id})" class="btn">删除</a></li>
    <li class="col-xs-3 "><a href="javascript:void()" onclick="update(this,${homeimgs.id})" class="btn">修改</a></li>
    <#if homeimgs.show ==1 >
     <li class="col-xs-3 "><a href="javascript:void()" onclick="show(this,${homeimgs.id})" class="btn">禁用</a></li>
     <#else>
     <li class="col-xs-3 "><a href="javascript:void()" onclick="show(this,${homeimgs.id})" class="btn">启用</a></li>
     </#if>
    </ul>
   </div>
  </div>
 </div>
 </#list>
</div>
</div>
</body>
</html>
<script>

//轮播图启用与禁用
function show(obj, id){
	if($(obj).html() == "启用"){
		$(obj).html("禁用");
		// 禁用的逻辑
		
		layer.msg('禁用成功!',{icon:1,time:1000});
	}else{
		$(obj).html("启用");
		// 启用的逻辑
		
		layer.msg('启用成功!',{icon:1,time:1000}); 
	}
}	

function del(obj, id){
	var str = '#img_'+id;
	layer.confirm('确认要删除吗？',{icon:0,},function(index){
		$(str).remove();
		//删除的逻辑
		
		
		layer.msg('已删除!',{icon:1,time:2000});
	});
}


function update(obj, id){
	
}

$("body").niceScroll({  
	cursorcolor:"#888888",  
	cursoropacitymax:1,  
	touchbehavior:false,  
	cursorwidth:"5px",  
	cursorborder:"0",  
	cursorborderradius:"5px"  
});
</script>
